#!/bin/bash
#检查8080端口是否被占用，如果占用输出1，如果没有被占用输入0

function main() {
  pIDa=`/usr/sbin/lsof -i :8081|grep -v "PID" | awk '{print $2}'|head -1`
  echo $pIDa
  if [ "$pIDa" != "" ];
  then
     echo "1"
  else
     echo "0"
  fi
}



main
